package com.tyl.xtk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tyl.xtk.beans.po.Role;
import com.tyl.xtk.beans.po.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {


    @Select("select r.* from user_role_map m left join role r on m.role_id = r.id where m.user_id = #{userId}")
    List<Role> selectRoleListByUserId(@Param("userId") long userId);
}
